#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

signals:

    /**
     * @brief broadcastMessage Emitted when we want to broadcast a message.
     * @param msg Message to broadcast
     */
    void broadcastMessage(QString msg);


private:
    /**
     * @brief ui Gui loaded from qt designer.
     */
    Ui::MainWindow *ui;

public slots:

    /**
     * @brief setServerStatus Sets server status in status label.
     * @param status Server status string.
     */
    void setServerStatus(QString status);

    /**
     * @brief addClient Adds client to connected clients widget.
     * @param client String identifying a client.
     */
    void addClient(QString client);

    /**
     * @brief removeClient Removes client from connected clients widget.
     * @param client String identifying a client.
     */
    void removeClient(QString client);

    /**
     * @brief addServer Adds server to connected servers widget.
     * @param host Host name of server.
     * @param port Port of server.
     */
    void addServer(QString host, int port);

    /**
     * @brief removeServer Removes server from connected servers widget.
     */
    void removeServer(QString);

    /**
     * @brief newFileCliked Displays new file dialog.
     */
    void newFileCliked();

    /**
     * @brief logMessage Logs message to main log text field.
     * @param msg Message to log.
     */
    void logMessage(QString msg);

};

#endif // MAINWINDOW_H
